import { tool_list } from '../service';
import { message } from 'antd';
/**
 * 添加节点
 * @param fields
 */
const toolList = async (params?: any) => {
  try {
    const t = await tool_list({ ...params });
    console.log(t.code)
    console.log(t)
    if (t.code==200){
      return t;
    }else{
      if(t.msg){
      message.error(t.msg)
      return [];
      }else{
        message.error(t)
        return [];
      }
    }
  } catch (error) {
    message.error("程序出错")
  }
};

export default toolList
